package cn.ekuma.impexp.ui.swing;

import java.awt.BorderLayout;
import java.util.ArrayList;
import java.util.HashMap;
import cn.ekuma.impexp.model.ImpExpTableDefinition;

import net.sourceforge.jwizardcomponent.JWizardComponents;
import net.sourceforge.jwizardcomponent.JWizardPanel;

public class JMatchTableColumnWizardPanel extends JWizardPanel{

	JTableColumnMatchPanel columnMatchPanel;

	ImpExpTableDefinition tableDefinition;
	
	public JMatchTableColumnWizardPanel(JWizardComponents wizardComponents) {
		super(wizardComponents);
		columnMatchPanel=new JTableColumnMatchPanel();
		add(columnMatchPanel,BorderLayout.CENTER);
	}

	@Override
	public boolean saveCurrentProperty(HashMap map) {
		return true;
	}

	@Override
	public void loadCurrentProperty(HashMap map) {
		tableDefinition=(ImpExpTableDefinition) map.get(Content.IMPORT_TABLE);
		columnMatchPanel.init(tableDefinition);
	}

	public ArrayList<ColumnMatch> getSelectedMatch() {
		return columnMatchPanel.execSelectedMatch();
	}
	
	
	
}
